<template>
	<lj-layout headerSrc="/pages_temp/static/images/bg-top.png" footerSrc="/pages_temp/static/images/bg-bottom.png">
		<view style="padding: 0 20rpx;">
			<view style="height: 100rpx;"></view>
			<view style="background-color: white;height: 400rpx;margin: 20rpx 20rpx;">
				phone:{{auth.phone}}
			</view>
			<view style="background-color: white;height: 400rpx;margin: 20rpx 20rpx;">
				from: {{auth.from}}
			</view>
			<view v-if='auth.phone'>
				已经有手机号了！！！
			</view>
		</view>
	</lj-layout>
</template>

<script setup>
	import LjLayout from "@/pages_temp/components/lj-layout.vue"
	import {
		useAuthStore
	} from '@/pages_temp/store/auth.js'

	uni.checkSession().then(() => {
		console.log('checkSession: success !!')
	}).catch(() => {
		uni.login({
			provider: 'weixin'
		}).then(res => {
			console.log('uni.login: ', res);
		}).catch(() => {
			console.log('uni.login: fail')
		})
	})

	const title = 'layout'
	const auth = useAuthStore()
	auth.setUser()
	
	const props = defineProps({
		from: String
	})
	console.log(props.from);
</script>

<style lang="scss" scoped>

</style>
